import request from './request'

// 获取计划列表
export function getPlans(date) {
  return request({
    url: '/plans',
    method: 'get',
    params: { date }
  })
}

// 创建计划
export function createPlan(data) {
  return request({
    url: '/plans',
    method: 'post',
    data
  })
}

// 更新计划
export function updatePlan(id, data) {
  return request({
    url: `/plans/${id}`,
    method: 'put',
    data
  })
}

// 删除计划
export function deletePlan(id) {
  return request({
    url: `/plans/${id}`,
    method: 'delete'
  })
}

// 更新计划提醒状态
export function updatePlanNotify(id) {
  return request({
    url: `/plans/${id}/notify`,
    method: 'put'
  })
} 